DYNAMIC SCROLLBAR CLASS
Author: Simon Coulton (scoulton@hotmail.com - MSN only)
Date: 23/11/2006
Version: 3.0
Availability: ActionScript 2.0; Flash Player 8
Scroller(content:MovieClip, height:Number, "ease:Number,speed:Number", type:String, up:MovieClip, down:MovieClip, dragger:MovieClip, track:MovieClip);
Parameters
content:MovieClip - The content that is going to be scrolled.
height:Number - The height of the mask (Note: Mask is dynamically created)
ease:Number - The amount of easing.
speed:Number - The speed of the scroll / dragger.
type:String - Either: 'click' or 'over' or 'both', click means the user must click the buttons, over will react to rollovers, both will react to clicks and over. Defaults to click.
down:MovieClip - The down button movieclip.
up:MovieClip - The up button movieclip.
dragger:MovieClip - The dragger movieclip.
track:MovieClip - The bar the dragger sits on.
Methods:
init();
- Initialises the scrollbar for use.
disable(type:String,alpha:Number [optional]);
- type can be either a) Hidden b) Trans. If not specified it will default to 'Hidden'.
- alpha can only be set if type is set to 'Trans'. If not specified it will default to 50.
output();
- Outputs either error messages (if Scrollbar creation has failed), or Scrollbar attributes if successful.
Requirements
The following instances must be on the stage for the scrollbar to work.
- Dragger [MovieClip]
- Up button [MovieClip]
- Down button [MovieClip]
- Content [MovieClip]
Example
See Scrollbar.fla for an example.
Notes
This scrollbar will not run any Intervals/EnterFrames when not actually moving to make it easier on slower machines.
Also creates the Mask dynamically so that you don't have to worry about additional layers in your timeline.
** Be sure to have a 0% alpha background inside your content:MovieClip if you are scrolling straight text.
Flash returns text height incorrectly, this is a work around for that. An example of this is in the FLA **
hey man
do you happen to know how to make the content resize when you use dynamic text rendered as html?
cause i've been looking a lot for a dynamic text field with a custom scrollbar.. i couldn't find any.
i hope you understand what i mean cause my english ain't that good..
thanks
hey man
do you happen to know how to make the content resize when you use dynamic text rendered as html?
cause i've been looking a lot for a dynamic text field with a custom scrollbar.. i couldn't find any.
i hope you understand what i mean cause my english ain't that good..
thanks
To celebrate the release of the exciting new Prince of Persia game, Ubisoft has teamed with the creative brilliance of deviantART's Community to blow the walls off this amazing contest (UK residents only).
This is a huge collection of deviations showing Vintage/Retro/Pinup/Digitally altered pictures in all variations from various Artists. Not just deviations showing slight sephia or a grungy texture but real retro style. Enjoy!
Featuring some of the most beautiful moments of life, forms, actions, and emotions. I Hope you will like it. here you are.. the big selection is waiting for you...
With over 5,000 entries, Square Enix was thrilled with deviantART's community response to "The World Ends with You" Contest" -- making it one of our most successful contests to date! As a result, the ingenious folks at Square Enix, the people who brought you "The World Ends with You" and "Kingdom Hearts", would like to have a little chat.
With a record level of nominations and suggestions on an almost daily basis, it would be hard to ignore the community call to recognise such a fine example of a deviant as `snowmask. Her constant presence since the formative years of deviantART has never wavered, demonstrating a natural ability to seek out and motivate those in need.
Katie's beautifully delicate artworks are elegant and instantly recognisable due to her finely tuned creative style, a clear reflection of her personality. With a multitude of journals which are thought provoking, funny and resourceful, it's impossible not to be touched by such a bright light in our community. Congratulati... Read More
Devious Comments
Enjoy
do you happen to know how to make the content resize when you use dynamic text rendered as html?
cause i've been looking a lot for a dynamic text field with a custom scrollbar.. i couldn't find any.
i hope you understand what i mean cause my english ain't that good..
thanks
do you happen to know how to make the content resize when you use dynamic text rendered as html?
cause i've been looking a lot for a dynamic text field with a custom scrollbar.. i couldn't find any.
i hope you understand what i mean cause my english ain't that good..
thanks
Previous PageNext Page